<?php

/*
 * 
 * 
 *  This software has been made FREE by author for the interest of other developers. 
 *       I hope this will help you in coding faster and robust php code
 *             You can modify and redistribute it as you like.
 *               Your comments, suggestions and corrections 
 *                           will be highly 
 *                            APPRECIATED. 
 *                                       Author
 * @author :   Roshan Budhathoki (developer.roshan@gmail.com);
 * @URL    :   <http://www.roshanbudhathoki.com>
 * 
 */

class Application extends base {
	protected $_view;
	
	public function __construct() {
		$this->setView ();
	}
	public function run($view = '') {
		$this->setView ( $view );
		if (Params::getParam ( ('tag') )) {
			View::newInstance()->_exportVariableToView('items',Model_Mapper_Items::newInstance()->getByTag(Params::getParam('tag')));
			$this->dispatch ( 'tag.phtml' );
		} else {
			echo 'No Tag Specified';
		}
		
		
	}
}